const Service = require('egg').Service;

class video extends Service {
    /*专辑列表*/
    async videoAlbum(pageNum,pageSize,categoryId,orderByField,recommendIs) {
        const sendData = {
            pageNum,
            pageSize,
            categoryId,
            orderByField,
            recommendIs,
        };
        return await this.ctx.service.base.getService('/device/videoAlbum/list',sendData);
    }
    /*专辑推荐*/
    async videoAlbumSimple(pageNum,pageSize,categoryId,orderByField,recommendIs) {
        const sendData = {
            pageNum,
            pageSize,
            categoryId,
            orderByField,
            recommendIs,
        };
        return await this.ctx.service.base.getService('/device/videoAlbum/listSimple',sendData);
    }
    /*专辑详情*/
    async videoAlbumDetail(id) {
        return  await this.ctx.service.base.getService('/device/videoAlbum/detail',{ id });
    }
    /*专辑目录大纲列表*/
    async videoAlbumOutline(albumId) {
        return await this.ctx.service.base.getService('/device/videoInfo/list',{ albumId });
    }
    /*专辑目录大纲列表*/
    async videoInfo(id) {
        return await this.ctx.service.base.getService('/device/videoInfo/detail',{ id,needStatus:false });
    }
    /*作业详情*/
    async taskInfo(id) {
        return await this.ctx.service.base.getService('/device/bbs/detail',{ id });
    }
}

module.exports = video;

